﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html>
<html>

<head>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">


<title>- 数据表格</title>
<meta name="keywords" content="">
<meta name="description" content="">

<link rel="shortcut icon" href="favicon.ico">
<link
	href="${pageContext.request.contextPath }/shoppingadmin/css/bootstrap.min.css?v=3.3.6"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath }/shoppingadmin/css/font-awesome.css?v=4.4.0"
	rel="stylesheet">

<!-- Data Tables -->
<link
	href="${pageContext.request.contextPath }/shoppingadmin/css/dataTables.bootstrap.css"
	rel="stylesheet">

<link
	href="${pageContext.request.contextPath }/shoppingadmin/css/animate.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath }/shoppingadmin/css/style.css?v=4.1.0"
	rel="stylesheet">

</head>

<body class="gray-bg">

	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>订单管理</h5>
					</div>
					<div class="ibox-content">
						<table
							class="table table-striped table-bordered table-hover dataTables-example">
							<thead>
								<tr>
									<th style="text-align: center;">用户ID</th>
									<th style="text-align: center;">联系人</th>
									<th style="text-align: center;">送货地址</th>
									<th style="text-align: center;">联系电话</th>
									<th style="text-align: center;">订单编号</th>
									<th style="text-align: center;">支付状态</th>
									<th style="text-align: center;">创建时间</th>
									<th style="text-align: center;">操作</th>
								</tr>
							</thead>

							<tbody>
								<c:forEach var="list" items="${shippinglist}">
									<tr class="gradeX">
										<td style="text-align: center;">${list.consigneess.user_id }</td>
										<td style="text-align: center;">${list.consigneess.consignee }</td>
										<td style="text-align: center;">${list.consigneess.consignee_address}</td>
										<td style="text-align: center;">${list.consigneess.phone }</td>
										<td style="text-align: center;">${list.order_no
											}</td>
										<td style="text-align: center;"><span
											class="label label-primary"> <c:choose>
													<c:when
														test="${list.payment_status =='1' && list.payment_status !=null }">已支付</c:when>
													<c:otherwise>未支付</c:otherwise>
												</c:choose> </span>
										</td>
										<td style="text-align: center;">${list.payment_time}</td>
										<td style="text-align: center;"><a
											class="btn btn-white btn-bitbucket" title="查看"
											href="${pageContext.request.contextPath }/ordermanage/shippingdetails/${list.ch_deliid}">
												<i class="fa fa-th-list" aria-hidden="true"></i> </a> <input
											type="hidden" value="103" /> <a
											class="btn btn-white btn-bitbucket delete" title="删除"
											href="${pageContext.request.contextPath }/ordermanage/delshipping/${list.ch_deliid}">
												<i class="fa fa-trash-o" aria-hidden="true"></i> </a>
										</td>
									</tr>
								</c:forEach>
							</tbody>

						</table>

					</div>
				</div>
			</div>
		</div>
	</div>
	<script
		src="${pageContext.request.contextPath }/shoppingadmin/js/jquery.min.js?v=2.1.4"></script>
	<script
		src="${pageContext.request.contextPath }/shoppingadmin/js/bootstrap.min.js?v=3.3.6"></script>
	<script
		src="${pageContext.request.contextPath }/shoppingadmin/js/jquery.jeditable.js"></script>
	<!-- Data Tables -->
	<script
		src="${pageContext.request.contextPath }/shoppingadmin/js/jquery.dataTables.js"></script>
	<script
		src="${pageContext.request.contextPath }/shoppingadmin/js/dataTables.bootstrap.js"></script>
	<!-- 自定义js -->
	<script
		src="${pageContext.request.contextPath }/shoppingadmin/js/content.js?v=1.0.0"></script>


	<!-- Page-Level Scripts -->
	<script>
		$(document)
				.ready(
						function() {
							$(".delete")
									.click(
											function() {
												var id = $(this).prev().val();
												if (confirm("确定删除吗？删除后将无法恢复！")) {
													window.location.href = "admin_dingdan_del.action?dingdan.id="
															+ id;
													return true;
												} else {
													return false;
												}
											});

							$('.dataTables-example').dataTable();

							/* Init DataTables */
							var oTable = $('#editable').dataTable();

							/* Apply the jEditable handlers to the table */
							oTable
									.$('td')
									.editable(
											'../example_ajax.php',
											{
												"callback" : function(sValue, y) {
													var aPos = oTable
															.fnGetPosition(this);
													oTable.fnUpdate(sValue,
															aPos[0], aPos[1]);
												},
												"submitdata" : function(value,
														settings) {
													return {
														"row_id" : this.parentNode
																.getAttribute('id'),
														"column" : oTable
																.fnGetPosition(this)[2]
													};
												},

												"width" : "90%",
												"height" : "100%"
											});

						});
		function fnClickAddRow() {
			$('#editable').dataTable()
					.fnAddData(
							[ "Custom row", "New row", "New row", "New row",
									"New row" ]);

		}
	</script>
</body>

</html>
